#include "junix.h"

int main(int argc, char **argv)
{
    struct hostent *phs;

    phs = gethostbyname (argv[1]);
    if(!phs)
        err_quit("Not found");

    printf("h_name: %s\n",phs->h_name);
    char **p=phs->h_aliases;
    while(*p)
            printf("h_aliases: %s\n",*p++);
    

    printf("h_addrtype: %d\n",phs->h_addrtype);
    printf("h_addr_list:%d\n",*phs->h_addr_list);
        
    exit(0);
}

